<?php
#### HEADERS #################################################################
session_start();
#### PARAMETERS & VARIABLES ##################################################

date_default_timezone_set('Europe/Moscow');

define("DB_HOST", 'localhost');
define("DB_DBNAME", 'macrofactor');
define("DB_USER", 'root');
define("DB_PASS", 'macro1234qwerty0');
define("SITE_HTTP_PATH", 'http://macrofactor.com/recepti/');
define("REDIRECT_PATH", 'http://macrofactor.com');
define("UPLOAD_USER_PATH", '/var/www/recepti/media/images/users/');
define("IMAGES_USER_PATH", 'http://macrofactor.com/recepti/media/images/users/');
define("MOVIE_PATH", 'http://macrofactor.com/movies/');

define("UPLOAD_STORY_PATH", '/var/www/recepti/media/images/story/');
define("IMAGES_STORY_PATH", 'http://macrofactor.com/recepti/media/images/story/');

define("UPLOAD_CONSULT_PATH", '/var/www/recepti/media/images/consultation/');
define("IMAGES_CONSULT_PATH", 'http://macrofactor.com/recepti/media/images/consultation/');

$GLOBALS["module"] = array(
    'recipes' => array('list', 'ajax'),
    'payment' => array('payment', 'ajax', 'success'),
    'movies' => array('list', 'play', 'ajax'),
    'global' => array('home'),
    'home' => array('list', 'ajax'),
    'users' => array('login', 'registration', 'ajax', 'profile', 'messages', 'sentmessages', 'systemmessages', 'friends', 'search', 'resetpassword', 'albums', 'answers', 'subscription', 'cp', 'download', 'downloadit', 'story', 'store', 'billpay'),
    'consultation' => array('list', 'listinner', 'story'),
    'statistic' => array('list'),
    'chat' => array('list', 'chome'),
    'agents' => array('list', 'ajax', 'panel', 'groups', 'generate', 'request', 'options'));
//
##$GLOBALS for all site prices
#Settings_price handling ePay::Levels,Prices; Paypal::Levels,prices; SMS:Numbers,Levels,Prices;
//
$GLOBALS["Settings_price"] = array(
    'sms' => array(
        'numbers' => array(
            1 => '1925',
            2 => '1928',
            3 => '1974',
            4 => '1982'),
        'prices' => array(
            1 => '1.20',
            2 => '2.40',
            3 => '4.80',
            4 => '6.00')),
    'epay' => array(
        1 => '2.40',
        2 => '4.80',
        3 => '10.00',
        4 => '20.00'),
    'paypal' => array(
        1 => '2.40',
        2 => '4.80',
        3 => '10.00',
        4 => '20.00'),
    'subscriptions' => array(
        1 => array(
            'time' => 3,
            'price' => '40.00'
        )
    ),
    'package' => array(
        1 => array(
            'quanity' => 10,
            'price' => '30.00'
        ),
        2 => array(
            'time' => 1,
            'price' => '10.00'
        ),
        3 => array(
            'time' => 10,
            'price' => '30.00'
        ),
        4 => array(
            'time' => 2000,
            'price' => '10.00'
        )
    ),
    'recipes' => array(
        'time' => array(
            1 => '1.20',
            3 => '2.40',
            5 => '4.80',
            7 => '6.00'
        )
    ),
    'download' => array(
        1 => array(
            'price' => '20.00'
        )
    ),
    'movies' => array(
        5 => array(
            'price' => '4.80'
        )
    )
);

$GLOBALS["Settings_currency"] = array(
    'bg' => "лв.",
    'ru' => "руб.",
    'eng' => "$",
    'tr' => "TRY"
);
#### INCLUDES ################################################################    
include_once('module/class.Interface.inc.php');
include_once('module/class.Connection.inc.php');
include_once('module/global/class.panel.inc.php');
include_once('module/global/class.simpleimage.inc.php');
include_once('module/global/class.data.inc.php');
include_once('module/global/class.geodata.inc.php');
include_once('module/global/class.validate.iban.php');
include_once('module/users/class.login.inc.php');
include_once('module/users/class.messages.inc.php');
#### ACTIONS #################################################################
#### WRITE SESSION ###########################################################
$lifetime = 3600 * 24 * 14; // Loged 14 days 
setcookie(session_name(), session_id(), time() + $lifetime);
#### OUTPUT ##################################################################
#### PAYMENT CONFIGURATIONS ################################################################
include_once('module/payment/encryption.php');

$url = "https://www.paypal.com/cgi-bin/webscr"; //Live
$curl = curl_init('https://www.paypal.com/cgi-bin/webscr'); //Live
$business = "ros94@mail.bg"; //Live

define("URL_PAYMENT", $url);
define("PAYPAL_CURL", $curl);
define("PAYPAL_MAIL", $business);
define("PAYPAL_CURRENCY", 'EUR');
?>
